1. Field of the Invention
The present invention relates to a filter, and more particularly, to a finite impulse response (hereinafter referred to as FIR) filter having a variable data input and output rate.
2. Background of the Related Art
Generally, in a FIR filter, filtering is performed when data to be filtered is located in the center of a filter. Adjacent data items are located at right and left sides of data to be filtered, which is located at the center. The adjacent data items are also used for filtering. That is, when data to be filtered is located at the center, a filtered result is outputted by multiplying data to be filtered and adjacent data items by predetermined weights (for example, coefficients) and summing up the results of the multiplications.
At that time, data inputted to the filter is multiplied by the applied weights, while repeating shifting operation. It is possible to obtain filtered result data as a result of applying the data to be filtered and the adjacent data to the respective weights when the data to be filtered is located at the center of the filter.
FIG. 1 is a block diagram of a common 9-tab FIR filter having a fixed single input and output, which shows an FIR filter of a single input and a single output.
As shown in FIG. 1, the FIR filter having a single input data produces one output data that is identical to the input after a predetermined delay by shifting.
There are some cases where a succeeding block, which receives the output data of the FIR filter as an input, requires one or two data at need. However, since the conventional filter as shown in FIG. 1 has the single input-output architecture, next input data must be further used besides the simultaneously required present data if the succeeding block requires two input simultaneously. Accordingly, the conventional filter has a disadvantage that generates a time delay for waiting for next input data.
The filter structure shown in FIG. 2 is a FIR filter that is obtained by improving the above problem of FIG. 1. The FIR filter as shown in FIG. 2 uses a shift register so that data is shifted by one tab for each clock. FIG. 2 shows an example of a 9-tap FIR filter having two input-outputs simultaneously, which receives two input data and obtains two filtered output data simultaneously.
In the case of FIG. 2, similarly, the succeeding block receiving output data of the FIR filter as an input may require one or two data at need. Also, the succeeding block may variably require one data and then, continuously require all of the two data items.
The structures shown in FIG. 1 and FIG. 2 may satisfy each case that the succeeding block requires one filtered pixel data or two filtered pixel data. However, the structure of FIG. 1 cannot satisfy the latter case, and the structure of FIG. 2 cannot satisfy the former case.
This is because the filtering should be performed with respect to both the adjacent data and the data to be filtered in accordance with its characteristic.
According to the characteristics of the FIR filter of FIG. 1 and FIG. 2, if one target data is inputted as shown in FIG. 3, the input data is located at the center of the filter after 5 (five) clocks are delayed if two target data are inputted as shown in FIG. 4, the input data is located at the center of the filter after 3 clocks are delayed.
A delay time for 5 clocks is required regardless of the input for one filter to use target data and adjacent data items for filtering and to obtain a filtering result through shifting of the data items as shown in FIG. 1.
Moreover, in case where only one filtering result data is required in a filter structure where two data items are inputted and outputted as shown in FIG. 2, two input data items are received. Therefore, a separate memory is required for storing the input data items.
As described above, the conventional FIR filter has the disadvantage that it cannot satisfy the variable demand since the input and output rates of the data are fixed.